//
//  BaseViewController.m
//  EconomyDemo
//
//  Created by qianfeng01 on 15-7-4.
//  Copyright (c) 2015年 xiangmu. All rights reserved.
//

#import "BaseViewController.h"
#import "TopView.h"
#import "DetailViewController.h"
#import "PictureModel.h"
#define kScreenSize [UIScreen mainScreen].bounds.size
@interface BaseViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) TopView *scrollerView;
@property (nonatomic,strong) UIPageControl *pageControl;
@property (nonatomic,strong) NSMutableArray *dataArray;
@property (nonatomic,strong) UITableView *tableView;
@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //[self creatTableView];
}
-(NSMutableArray *)dataArray
{
    if (self.dataArray==nil) {
        self.dataArray=[[NSMutableArray alloc]init];
    }
    return _dataArray;
}

-(void)addScrollView:(NSMutableArray *)imageNames title:(NSMutableArray *)titleNames{
    CGRect frame=CGRectMake(100, 100, self.view.bounds.size.width, 30);
    self.pageControl=[[UIPageControl alloc] initWithFrame:frame];
    self.pageControl.numberOfPages=5;
    self.pageControl.backgroundColor=[UIColor clearColor];
    
    
    [self.tableView addSubview:self.pageControl];
    self.scrollerView=[[TopView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 170)];
    self.scrollerView.delegate=self;
    self.scrollerView.showsHorizontalScrollIndicator=NO;
    self.scrollerView.imageNames=imageNames;
    self.scrollerView.titleNames=titleNames;
    
    

    
    self.tableView.tableHeaderView=self.scrollerView;
    
}
- (void)tap:(UIGestureRecognizer *)tap{
    NSLog(@"哈哈哈哈哈哈哈哈");
    DetailViewController *controller=[[DetailViewController alloc] init];
   
    [self presentViewController:controller animated:YES completion:nil];
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
